from django.conf.urls import patterns, include, url
from  django.views.generic.simple import direct_to_template, redirect_to
from  django.views.generic.list_detail import object_list
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from socios.models import Socio
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'asociacion.views.home', name='home'),
    # url(r'^asociacion/', include('asociacion.foo.urls')),
    # (r'^$', direct_to_template, {'template': 'inicio.html'}),
    (r'^$', include('zinnia.urls')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^kdb/', include('kdb.urls')),
    url(r'^blog/', include('zinnia.urls')),
    url(r'^comments/', include('django.contrib.comments.urls')),
    (r'^contacto/$', direct_to_template, {'template': 'contacto.html'}),
    (r'^socios/$', 
object_list,{'queryset':Socio.objects.all().order_by('?'),'template_name':'nosotros.html'}),
    # (r'^inicio/$', direct_to_template, {'template': 'inicio.html'}),

)


urlpatterns += patterns('django.contrib.staticfiles.views',
    url(r'^static/(?P<path>.*)$', 'serve'),)
        